package fox.framework.rpc.context.order;

import java.util.List;

/**
 * @author cuichao
 * @Description: Order
 * @Date: create in 2021/2/18 16:24
 */
public interface Order {

    int order();

    static void sort(List orders){
        orders.sort((o1,o2) -> ((Order)o1).order() -  ((Order)o2).order());
    }

    static void sortByDesc(List orders){
        orders.sort((o1,o2) -> ((Order)o2).order() -  ((Order)o1).order());
    }
}
